import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AssetsChangeComponent } from './assetsChange/assetsChange';
import { AssetsChangeEditComponent } from './assetsChange/edit/edit';
import { AssetsMgmtComponent } from './assetsMgmt/assetsMgmt';

const routes: Routes = [
	{
		path: '',
		children: [
			{
				path: '',
				redirectTo: 'assets',
			},
			{
				path: 'assets',
				component: AssetsMgmtComponent,
				data: {
					title: '资产管理',
					url: 'assetsMgmt/assets',
				},
			},
			{
				path: 'assetsChange',
				component: AssetsChangeComponent,
				data: {
					title: '资产变化感知',
					url: 'assetsMgmt/assetsChange',
				}
			},
			{
				path: 'assetsChange/edit',
				component: AssetsChangeEditComponent,
				data: {
					title: '资产变化感知-修改',
					url: 'assetsChange/edit',
				}
			},
			{
				path: '**',
				redirectTo: 'home',
			},
		],
	},
];

@NgModule({
	imports: [RouterModule.forChild(routes)],
	exports: [RouterModule],
})
export class AssetsMgmtRoutingModule { }
